﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucListProductUnit.ascx.cs" Inherits="SES.CMS.AdminCP.PageUC.ucListProductUnit" %>
<h2>
    Danh sách đơn vị tính</h2>

<div style="float:left; width:100%;">
    <asp:GridView ID="gvDonViTinh" DataKeyNames="DonViID" runat="server" AutoGenerateColumns="False"
        BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
        CellPadding="4" OnRowDeleting="gvDonViTinh_RowDeleting" 
        OnSelectedIndexChanged="gvDonViTinh_SelectedIndexChanged" AllowPaging="True"
        PageSize="25" Width="100%" 
        onpageindexchanging="gvDonViTinh_PageIndexChanging">
        <RowStyle BackColor="White" ForeColor="#330099" HorizontalAlign="Center" 
            VerticalAlign="Bottom" />
        <Columns>
        <asp:BoundField DataField="DonViID" HeaderText="Mã đơn vị"   Visible="false"/>
        <asp:BoundField DataField="MaDonViTinh" HeaderText="Mã đơn vị"  ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
            <asp:BoundField DataField="DonViTinh" HeaderText="Tên đơn vị" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
            <asp:BoundField DataField="MoTa" HeaderText="Mô tả" SortExpression="MoTa" Visible="false" />
           
<%--            <asp:TemplateField HeaderText="Hình ảnh">
                <ItemTemplate>
                    <img alt="images" width="100px" height="100px" src='../Media/<%#Eval("HinhAnh") %>' />
                </ItemTemplate>
            </asp:TemplateField>--%>
            <asp:TemplateField HeaderText="Thao tác" ItemStyle-Width="10%">
                <ItemTemplate>
                    <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                    <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("DonViID") %>'
                        CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" 
            VerticalAlign="Middle" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
    </asp:GridView>
    <br />
    <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Thêm mới" />
</div>